package cn.baimo.pojo;

import java.io.Serializable;

/**
 * ClassName: Comment
 * Description:评论编号
 * date: 2020/8/28 0028 15:29:58
 * <p>
 * cid	        int	            主键，自增	    编号
 * comment	    varchar(255)	非空	            评论内容
 * publishDate	datetime	    非空	            发表时间
 * level	    int[1]	        非空	            回复等级(1:评论,2:回复)
 * parentId	    int	            外键cid	        父评论id
 * uid	        varchar(255)	外键user表	    发表的用户id
 * mid	        int	            外键microblog表	编号
 *
 * @author BaiMo
 * @since JDK 1.8
 */
public class Comment implements Serializable {
    private int cid;//评论编号
    private String comment;//评论内容
    private String publishDate;//发表时间
    private int level;//回复等级(1:评论,2:回复)
    private Comment parentId;//父评论id
    private String user;//发表的用户
    private MicroBlog microBlog;//所属微博

    public Comment(int cid, String comment, String publishDate, int level, Comment parentId, String user, MicroBlog microBlog) {
        this.cid = cid;
        this.comment = comment;
        this.publishDate = publishDate;
        this.level = level;
        this.parentId = parentId;
        this.user = user;
        this.microBlog = microBlog;
    }

    public Comment() {
    }

    @Override
    public String toString() {
        return "Comment{" +
                "cid=" + cid +
                ", comment='" + comment + '\'' +
                ", publishDate='" + publishDate + '\'' +
                ", level=" + level +
                ", parentId=" + parentId +
                ", user='" + user + '\'' +
                ", microBlog=" + microBlog +
                '}';
    }

    public int getCid() {
        return cid;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(String publishDate) {
        this.publishDate = publishDate;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public Comment getParentId() {
        return parentId;
    }

    public void setParentId(Comment parentId) {
        this.parentId = parentId;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public MicroBlog getMicroBlog() {
        return microBlog;
    }

    public void setMicroBlog(MicroBlog microBlog) {
        this.microBlog = microBlog;
    }
}
